Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Enhanced RDoc for Net::HTTP #85

Merged
merged 6 commits into from
Dec 11, 2022
Merged

[DOC] Enhanced RDoc for Net::HTTP #85

merged 6 commits into from
Dec 11, 2022

Conversation

BurdetteLamar
Copy link
Member

Treats:

  • #post
  • #post_form
  • ::start
  • ::new

Caveats:

  • Not sure I have :ENV right.
  • I have said nothing about argument +p_no_proxy+, b/c I don't know what to say. The previous doc is less than informative.

I've marked several things as :nodoc:, believing them to be obsolete.

@BurdetteLamar BurdetteLamar added the documentation Improvements or additions to documentation label Dec 7, 2022
Copy link
Member

@peterzhu2118 peterzhu2118 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like p_no_proxy can reject certain proxies. Some examples:

It can reject a certain address:

http = Net::HTTP.new("example.com", nil, 'proxy.example', 8000, 'pname', 'ppass', "proxy.example")
http.proxy_address # => nil

It can reject certain domains or subdomains:

http = Net::HTTP.new("example.com", nil, 'my.proxy.example', 8000, 'pname', 'ppass', "proxy.example")
http.proxy_address # => nil

It can reject certain addresses and port combinations:

http = Net::HTTP.new("example.com", nil, 'proxy.example', 8000, 'pname', 'ppass', "proxy.example:1234")
http.proxy_address # => "proxy.example"
http = Net::HTTP.new("example.com", nil, 'proxy.example', 8000, 'pname', 'ppass', "proxy.example:8000")
http.proxy_address # => nil

It can reject a list of the types above delimited using a comma:

http = Net::HTTP.new("example.com", nil, 'proxy.example', 8000, 'pname', 'ppass', "my.proxy,proxy.example:8000")
http.proxy_address # => nil
http = Net::HTTP.new("example.com", nil, 'my.proxy', 8000, 'pname', 'ppass', "my.proxy,proxy.example:8000")
http.proxy_address # => nil

lib/net/http.rb Outdated Show resolved Hide resolved
lib/net/http.rb Outdated Show resolved Hide resolved
lib/net/http.rb Outdated Show resolved Hide resolved
lib/net/http.rb Outdated Show resolved Hide resolved
lib/net/http.rb Outdated Show resolved Hide resolved
lib/net/http.rb Outdated Show resolved Hide resolved
lib/net/http.rb Outdated Show resolved Hide resolved
lib/net/http.rb Outdated Show resolved Hide resolved
lib/net/http.rb Outdated Show resolved Hide resolved
lib/net/http.rb Outdated Show resolved Hide resolved
@BurdetteLamar
Copy link
Member Author

Added text about p_no_proxy.

@BurdetteLamar
Copy link
Member Author

Thanks, @peterzhu2118, for your prompt review. I somehow got the notification email marked as read, and so didn't discover til now.

lib/net/http.rb Outdated Show resolved Hide resolved
lib/net/http.rb Outdated Show resolved Hide resolved
lib/net/http.rb Outdated Show resolved Hide resolved
lib/net/http.rb Outdated Show resolved Hide resolved
Copy link
Member

@peterzhu2118 peterzhu2118 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@peterzhu2118 peterzhu2118 merged commit 9d9040f into ruby:master Dec 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Development

Successfully merging this pull request may close these issues.

2 participants